<template>
  <div>
    <!-- 底部标签栏 -->
    <van-tabbar v-model="active" active-color="#1074ff" fixed route>
      <van-tabbar-item
        replace
        to="/home"
        :icon="active == '/home' ? 'wap-home' : 'wap-home-o'"
        color="#1074ff"
        >首页</van-tabbar-item
      >
      <van-tabbar-item
        replace
        to="/epidemicdata"
        :icon="active == '/epidemicdata' ? 'todo-list' : 'todo-list-o'"
        color="#1074ff"
        >疫情数据</van-tabbar-item
      >
      <van-tabbar-item
        replace
        to="/onlineservice"
        :icon="active == '/onlineservice' ? 'chat' : 'chat-o'"
        color="#1074ff"
        >在线客服</van-tabbar-item
      >
      <van-tabbar-item
        replace
        to="/personalcenter"
        :icon="active == '/personalcenter' ? 'manager' : 'user-o'"
        color="#1074ff"
        >个人中心</van-tabbar-item
      >
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data() {
    return {
      active: this.$route.path,
    };
  },
  mounted() {
    // console.log("当前active" + this.active);
  },

  watch: {},
};
</script>

<style lang="scss" scoped>
</style>